<!DOCTYPE html>
<html>
<head>
<div th:replace="common/common_resource :: common_css"></div>
<title th:text="${application.shop_name} +' | 查看所有商品'"></title>
</head>
<body class="hold-transition skin-blue sidebar-mini" >
	<div class="wrapper">
		<div th:replace="common/common_h5 :: loginAndLogout"></div>
		<div th:replace="common/common_h5 :: upload_image"></div>
		<div th:replace="common/common_h5 :: left_menu"></div>
		<div class="content-wrapper">
			<section class="content">
					<div class="row">
					<div class="col-xs-12">
						<div class="box">
							<div class="box-header">
								<div class="row">
									<div class="col-xs-4">
									</div>
									<div class="col-xs-4">
										<h3 class="box-title">商品列表</h3>
									</div>
									<div class="col-xs-4"></div>
								</div>
							</div>
							<div class="box-body table-responsive">
								<table id="example2" class="table table-bordered table-striped ">
									<thead>
										<tr class="bg-green ">
											<th>商品货号</th>
											<th>商品图片</th>
											<th>商品名称</th>
											<th>门店价</th>
											<th>市场价</th>
											<th>商品状态</th>
											<th>商品销量</th>
											<th>商品库存</th>
											<th>商品规格数</th>
											<th>商品修改时间</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<tr th:class="${goodsStat.index % 2 ==0}? '' : ''" th:each="goods,goodsStat : ${dataBean.goodslist}">
											<td th:text="${goods.goodsNum}"></td>
											<td>
												<div style="float: left; margin: 3px; overflow: hidden;">
													<a th:href="${#httpServletRequest.getContextPath()}+'/goods/getGoodsInfo?goodsId='+${goods.goodsId}+'&menuUuid='+${menuUuid!=null? menuUuid :'220'}">
														<img th:if="${goods.goodsImg!=''}" class="lazy img-md" height="80px" width="80px" th:src="@{${#strings.append(pathfile,goods.goodsImg)}}" />
													</a>
												</div>
											</td>
											<td >
												<a th:href="${#httpServletRequest.getContextPath()}+'/goods/getGoodsInfo?goodsId='+${goods.goodsId}+'&menuUuid='+${menuUuid!=null? menuUuid :'220'}" th:text="${goods.goodsName}"></a>
											</td>
											<td ><font color="red" th:text="￥+${goods.goodsShopprice}"></font></td>
											<td th:text="￥+${goods.goodsMarketprice}"></td>
											<td>
										 		<code th:if="${goods.goodsIssale==0 && goods.goodsCheck==0}">未审核</code>
										 		<code th:if="${goods.goodsIssale==0 && goods.goodsCheck==1}">停售</code>
										 		<code th:if="${goods.goodsIssale==1 && goods.goodsCheck==1}">在售</code>
											</td>
											<td th:text="${goods.goodsSalenum}"></td>
											<td th:text="${goods.goodsStock}"></td>
											<td th:text="${goods.skuCount}"></td>
											<td th:text="${goods.goodsUpdateTimeView}"></td>
											<td>
												<div class="row">
													<div class="col-xs-3">
														<a href="javascript:void(0);" th:id="${goods.goodsId}" name="show" class="fa fa-wrench btn btn-primary">修改价格</a>
														
													</div>
													
													<div class="col-xs-1"></div>
													<div  th:if="${goods.goodsIssale==0 && goods.goodsCheck==1}" class="col-xs-3">
														<form  th:action="${#httpServletRequest.getContextPath()}+'/goods/goodsSale'"method="post">
															<input type="hidden" name="goodsId" th:value="${goods.goodsId}"/>
															<input type="hidden" name="menuUuid" value="230">
															<button type="submit" class="fa fa-arrow-up btn btn-primary">上架</button>
														</form>
													</div>
													
													<div th:if="${goods.goodsIssale==1 && goods.goodsCheck==1}" class="col-xs-3">
														<form  th:action="${#httpServletRequest.getContextPath()}+'/goods/goodsNotSale'"method="post">
															<input type="hidden" name="goodsId" th:value="${goods.goodsId}"/>
															<input type="hidden" name="menuUuid" value="220">
															<button type="submit" class="fa fa-arrow-down btn btn-warning">下架</button>
														</form>
													</div>
													
													<div th:if="${goods.goodsIssale==0 && goods.goodsCheck==0}" class="col-xs-3">
														<form  th:action="${#httpServletRequest.getContextPath()}+'/goods/goodsCheck'"method="post">
																<input type="hidden" name="goodsId" th:value="${goods.goodsId}"/>
																<input type="hidden" name="menuUuid" value="240">
																<button type="submit" class="fa fa-check-square-o btn btn-success">审核</button>
														</form>
													</div>
													<div class="col-xs-3">
														<a href="javascript:void(0);" th:id="${goods.goodsId}"  data-toggle="tooltip"  data-placement="top" data-original-title="删除后将无法恢复"  class="fa fa-trash btn btn-danger example5-3-2" >废除</a>
													</div>
												</div>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</section>
		</div>
		
		<div class="modal fade"  id="goods_price_update" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog ">
				<div class="modal-content" style="width:800px;">
					<div class="modal-header bg-blue">
						<button  type="button"  name="cleanAll" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">快速修改商品价格(<font color="red">&nbsp;&nbsp;*</font>为必填项)</h4>
					</div>
					<div class="modal-body">
						<form role="form" id="formGoodsSku" th:action="${#httpServletRequest.getContextPath()}+'/goods/updadeGoodsSkuPriceInfo'"method="post">
							<div class="box-body">
								<div class="form-group">
									<input type="hidden" id="goodsIdSku" name="goodsId">
									<label for="goodsNumSku">商品编号：<font color="red" id="goodsNumSku">00012</font></label>
								</div>
								<div class="form-group">
									<label for="goodsNameSku">商品名称：<font color="red" id="goodsNameSku">中山同城配送六十六朵玫瑰</font></label>
								</div>
								<table id="example2" class="table table-bordered table-striped ">
									<thead>
										<tr class="bg-green ">
											<th>规格图片</th>
											<th>规格名称</th>
											<th>门店价（￥）<font color="red">&nbsp;&nbsp;*</font></th>
											<th>市场价（￥）<font color="red">&nbsp;&nbsp;*</font></th>
										</tr>
									</thead>
									<tbody id="AddgoodsSkuPrice">
										
									</tbody>
								</table>
								<input type="hidden" id="imgPathfile" th:value="${pathfile}">
							</div>
							<div class="modal-footer">
								<div class="row">
									<div class="col-xs-6 text-center">
										<button type="reset" class="btn btn-warning" name="cleanAll">清&nbsp;&nbsp;&nbsp;&nbsp;除</button>
									</div>
									<div class="col-xs-6 text-center">
										<button type="button" id="updateGoodsSkuPriceButton" class="btn btn-primary">提&nbsp;&nbsp;&nbsp;&nbsp;交</button>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		
		<div th:replace="common/common_h5 :: down_foot"></div>
		<div th:replace="common/common_h5 :: down_sidebar"></div>
		<div th:replace="common/common_h5 :: error_message"></div>
		<div class="control-sidebar-bg"></div>
		<div th:replace="common/common_resource :: common_js"></div>
		<script th:src="@{/admin_js/basics/process/goods_list.js}"></script>
</body>
</html>
